<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<html>
<head>
	<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
	<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<link href="${contextPath}/styles/default.css" rel="stylesheet" type="text/css" />
<title>盘库管理</title>
<script type="text/javascript">
	function jumpPage(page) {
		var searchForm = document.searchForm;
		searchForm.action = "<s:property value='contextPath'/>/cs/index.do?currentPage=" + page;
		searchForm.submit();
	}

	function view(id) {
		var searchForm = document.searchForm;
		searchForm.action = "<s:property value='contextPath'/>/cs/view.do?currentPage=${currentPage}&entity.id="+id;
		searchForm.submit();
	}
	
	function exportcf(){
		var searchForm = document.searchForm;
		searchForm.action = "<s:property value='contextPath'/>/cs/export.do";
		searchForm.submit();
	}
	function dosubmit(){
		var searchForm = document.searchForm;
		searchForm.action = "<s:property value='contextPath'/>/cs/search.do";
	}
	$(document).ready(function(){
		
	});
</script>
</head>
<body>
<div class="navigation">
  <span><a href="javascript:window.history.back();"><img src="${contextPath}/images/back_nav_btn.png" /></a>
  <a href="javascript:window.history.back();">返回</a>
  <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
   <a href="javascript:window.history.forward();">前进</a>
  <a href="javascript:window.location.reload();"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
   <a href="javascript:window.location.reload();">刷新</a>
  </span>盘库管理&gt;&gt;盘库汇总查询 
</div>

<div class="xt_main_right_center">    
<form name="searchForm" id="searchForm" method="post" action="search.do">
	<table width="100%" border="0" cellpadding="0" cellspacing="0"  style="border-color:#CCCCCC;">
	   <tr>
	      <td class="left-td-width-bg"><span>盘库时间:</span></td>
	      <td>
	      	<input name="beginDate"   class="Wdate" type="text" style="width: 100px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="true" value="<s:date name="beginDate" format="yyyy-MM-dd"/>"/>
	      	至 <input name="endDate"  class="Wdate" type="text" style="width: 100px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="true" value="<s:date name="endDate" format="yyyy-MM-dd"/>"/>
	      </td>
	      <td class="left-td-width-bg"><span>盘库状态:</span></td>
	      <td>
	      	<select name="status">
	      		<option value="">--请选择--</option>
	      		<option value="1" <s:if test="status==1">selected="selected"</s:if> >已盘</option>
	      		<option value="0" <s:if test="status==0">selected="selected"</s:if> >未盘</option>
	      	</select>
	      </td>
	      <td class="left-td-width-bg"><span>盘库结果:</span></td>
	      <td>
	      	<select name="success">
	      		<option value="">--请选择--</option>
	      		<option value="1" <s:if test="success==1">selected="selected"</s:if> >成功</option>
	      		<option value="0" <s:if test="success==0">selected="selected"</s:if> >失败</option>
	      	</select>
	      </td>
	      <td><input type="submit" value="" onclick="dosubmit()"  class="btn_query"/></td>
	  </tr>
	</table>
</form>
</div> 
<br/>
 <table width="100%" border="0" cellpadding="0" cellspacing="0">
	     <tr>
	       <td height="25" align="left"><font color="#0066CC"><strong>汇总表：</strong></font><font color="red">点击日期可链接到详情</font></td>
	       <td height="25" align="right"><a href="javascript:exportcf()"><img src="${contextPath}/images/export.png" alt="导出"  /></a>
	       </td>
	     </tr>
  </table> 
      
     
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
<s:if test="rowOne==nullrowTwo==null||rowTwo.size==0||rowThree==null||rowList==null||rowList.size==0">
<tr bgcolor="#FFFFFF"><td align="center">没有相关盘库信息,请尝试更换盘库时间</td></tr>
</s:if>
<s:else>
	<tr>
		<s:iterator value="rowOne"><!-- 第1行 -->
			<td class="top-td-width-bg" colspan="<s:property value='value'/>"><s:property value='key'/></td>
		</s:iterator>
	</tr>
	<tr>
		<s:iterator value="rowTwo"><!-- 第2行 -->
			<td class="top-td-width-bg" colspan="<s:property value='value'/>">
		       <s:if test="%{null!=key&&key.indexOf('_')!=-1}">
                      <s:property value="%{key.substring(0, key.indexOf('_'))}" />
	           </s:if>
	           <s:else>
	                  <s:property value="key" />
	           </s:else>
			</td>
		</s:iterator>
	</tr>
	<tr>
		<s:iterator value="rowThree"><!-- 第3行 -->
			<td class="top-td-width-bg" colspan="<s:property value='value'/>">
				<s:if test="%{null!=key&&key.indexOf('_')!=-1}">
                      <s:property value="%{key.substring(0, key.indexOf('_'))}" />
	           </s:if>
	           <s:else>
	                  <s:property value="key" />
	           </s:else>
			</td>
		</s:iterator>
	</tr>
	
	<s:iterator value="rowList" status="st"><!-- 行集合 -->
		<tr>
			<td class="down-center-td-width-bg"><s:property value="#st.index+1"/></td>
			<td class="down-center-td-width-bg"><s:property value="shopNum"/></td>
			<td class="down-center-td-width-bg"><s:property value="shopName"/></td>
			<td class="down-center-td-width-bg"><s:property value="shopUser"/></td>
			<td class="down-center-td-width-bg"><s:property value="areaManager"/></td>
			<s:iterator value="itemList"><!-- 每行包括多个盘库单 -->
				<s:iterator value="numberList" id="column"><!-- 每个盘库单包含多个银行 -->
					<td class="down-center-td-width-bg"><s:property value="#column"/></td>
				</s:iterator>
				<td class="down-center-td-width-bg"><s:if test="csway==0">非现场</s:if><s:elseif test="csway==1">现场</s:elseif></td>
				<td class="down-center-td-width-bg"><a href="javascript:view(<s:property value='csid'/>)" ><s:property value="submitDate"/></a></td>
				<td class="down-center-td-width-bg"><s:property value="remark"/></td>
			</s:iterator>
			
		</tr>
	</s:iterator>
	
	<!-- 测试 -->
	<s:iterator value="emptyList" status="st"><!-- 行集合 -->
		<tr>
			<td class="down-center-td-width-bg"><s:property value="#st.index+rowList.size+1"/></td>
			<td class="down-center-td-width-bg"><s:property value="shopNum"/></td>
			<td class="down-center-td-width-bg"><s:property value="shopName"/></td>
			<td class="down-center-td-width-bg"><s:property value="shopUser"/></td>
			<td class="down-center-td-width-bg"><s:property value="areaManager"/></td>
			<s:iterator begin="1" end="rowThree.size-5"><!-- 每行包括多个盘库单 -->
				<td class="down-center-td-width-bg"></td>
			</s:iterator>
			
		</tr>
	</s:iterator>
	<!-- 测试 -->
</s:else>
	
</table>

	<br/><br/><br/><br/><br/>
	<div align="center"><jsp:include page="/include/footer.inc"></jsp:include></div>
</body>
</html>